<%--
  Created by IntelliJ IDEA.
  User: cos
  Date: 2022/9/30
  Time: 16:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="page/head.jsp" %>
<html>
<head>
    <title>Title</title>
</head>


<body>
<div class="container">
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <form action="/book/addBook" method="post">

                <div class="form-group">
                    <label for="ename">书名</label>
                    <input type="text" class="form-control" id="ename" name="name" value=""
                           placeholder="书名">

                </div>

                <div class="form-group">
                    <label for="author">作者</label>
                    <input type="text" class="form-control" id="author" name="author" value=""
                           placeholder="作者">
                </div>

                <div class="form-group">
                    <label for="publish">出版社</label>
                    <input type="text" class="form-control" id="publish" name="publish" value=""
                           placeholder="出版社">
                </div>

                <div class="form-group">
                    <label for="date">出版日期</label>
                    <input type="date" class="form-control" id="date" name="publishdate" value="">
                </div>

                <div class="form-group">
                    <label for="pages">页数</label>
                    <input type="number" class="form-control" id="pages" name="page" value="" placeholder="页数">
                </div>

                <div class="form-group">
                    <label for="price">价格</label>
                    <input type="text" class="form-control" id="price" name="price" value=""
                           placeholder="价格">
                </div>


                <div class="form-group">
                    <label for="content">内容摘要</label>
                    <input type="text" class="form-control" id="content" name="content" value=""
                           placeholder="内容摘要">
                </div>



                <button type="submit" class="btn btn-default" id="btn1" >新增</button>
            </form>
        </div>
    </div>
</div>
<script>
    $(function () {


        // $("#ename").change(function () {
        //     $.ajax({
        //         url: "/emp/checkName?ename="+$(this).val(),
        //         type: "get",
        //         success: function (result) {
        //             if (result == 1) {
        //                 $(this).css("color", "green");
        //                 $("#msg").text("用户可用").css("color", "green");
        //                 $("#btn1").removeAttr("disabled");
        //             } else {
        //                 $(this).css("color", "red");
        //                 $("#msg").text("用户不可用").css("color", "red");
        //                 $("#btn1").attr("disabled","disabled");
        //             }
        //         }
        //     })
        // })
    })
</script>
</body>
</html>
